package com.nubaseg.parser;

import org.junit.Test;
import static org.junit.Assert.assertEquals;

/**
 * Created with IntelliJ IDEA.
 * User: Nubaseg
 * Date: 20.10.13
 * Time: 0:21
 */
public class ArithmeticParserTest {

    @Test
    public void testRPNtoDouble() throws Exception {
        String[] arg = {"2", "2", "+", "1", "-"};
        double res = 3;
        assertEquals(res, ArithmeticParser.RPNtoDouble(arg), 0.0000001);
    }
}
